package com.yserp.project.erp.order.purchorder.domain;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yserp.framework.aspectj.lang.annotation.Excel;
import com.yserp.framework.web.domain.BaseEntity;
import com.yserp.project.erp.common.anno.MybatisLikeSearch;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 采购订单对象 erp_purch_order
 *
 * @author yserp
 * @date 2022-08-02
 */
@TableName("erp_purch_order")
@Data
public class PurchOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 订单号
     */
    @Excel(name = "订单号")
    @MybatisLikeSearch
    private String orderNo;

    /**
     * 供应商Id
     */
    private Long supplierId;

    /**
     * 供应商名称
     */
    @Excel(name = "供应商名称")
    @MybatisLikeSearch
    private String supplierName;

    /**
     * 仓库ID
     */
    private Long warehouseId;

    /**
     * 仓库名称
     */
    @Excel(name = "仓库名称")
    @MybatisLikeSearch
    private String warehouseName;

    /**
     * 送货人
     */
    @Excel(name = "送货人")
    @MybatisLikeSearch
    private String sendUser;

    /**
     * 送货人联系方式
     */
    @Excel(name = "送货人联系方式")
    private String sendPhone;

    /**
     * 收货地址
     */
    @Excel(name = "收货地址")
    private String receiveAddress;

    /**
     * 业务责任人
     */
    @Excel(name = "业务责任人")
    @MybatisLikeSearch
    private String businessManager;

    /**
     * 发货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date orderDate;

    /**
     * 订单状态（0:未审核 1:已审核）
     */
    @Excel(name = "订单状态", readConverterExp = "0=未审核,1=已审核")
    private String orderStatus;

    /**
     * 发货状态（0:未发货，1:已入库）
     */
    @Excel(name = "发货状态", readConverterExp = "10=待入库,11=已入库")
    private String deliveryStatus;

    /**
     * 发货状态（0:未发货，1:已入库）
     */
    @Excel(name = "付款状态", readConverterExp = "0=未付款,1=部分付款,2=全部付款")
    private String payStatus;

    /**
     * 采购数量
     */
    @Excel(name = "采购数量")
    private BigDecimal nums;

    /**
     * 采购数量
     */
    @Excel(name = "入库数量")
    private BigDecimal inNums;

    /**
     * 采购金额
     */
    @Excel(name = "采购金额")
    private BigDecimal amounts;

    /**
     * 采购金额
     */
    @Excel(name = "付款金额")
    private BigDecimal payAmounts;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableLogic
    private String delFlag;


}
